package com.Logistics.pdbase.controller;


import com.Logistics.mycommon.pojo.pdbase.PdGoodsType;
import com.Logistics.pdbase.service.PdGoodsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 货物类型表 前端控制器
 * </p>
 *
 * @author PinDaLogistics
 * @since 2024-08-05
 */
@CrossOrigin
@RestController
@RequestMapping("/servicebase/pd-goods-type")
public class PdGoodsTypeController {

    @Autowired
    private PdGoodsTypeService pdGoodsTypeService;

    @PostMapping
    public List<PdGoodsType> goodsTypes(@RequestBody Map<String, String> params) {
        String name = params.get("name");
        return pdGoodsTypeService.selectByName(name);
    }

}

